package com.cn.stusy0015.demo0020;

import java.util.Scanner;

/**
 * @author lw
 * @ClassName TestStu.java
 * @Description
 * @createTime 2023年05月21日 16:02:00
 */
public class TestStu {
    public static void main(String[] args) {
        Student s1 = new Student();
        StudentPd pd = new StudentPd();
        Scanner sc = new Scanner(System.in);
        System.out.print("***********注册**********\n");
        System.out.print("请输入姓名:");
        String sname = sc.next();
        System.out.print("请输入密码:");
        String spassword = sc.next();
        s1.setSname(sname);
        s1.setSpassword(spassword);
        pd.addStu(s1);
        System.out.println("++++++++++登录++++++++++++");
        System.out.print("请输入姓名:");
        String name = sc.next();
        System.out.print("请输入密码:");
        String pas = sc.next();
        if(pd.loginVerify(name, pas)){
            System.out.println("登录成功！");
        }else {
            System.out.println("登录失败！");
        }
    }
}
